package com.happy.admin.utils;

import com.alibaba.druid.pool.DruidDataSource;

import javax.sql.DataSource;

/**
 * \* User: wei.zhang
 * \* Date: 2019/11/2 17:06
 * \* Description:
 * \
 */
public class DateSourceUtils {
    public static DataSource create(String url, String userName, String password, String driver) {
        DruidDataSource druidDataSource = new DruidDataSource();
        druidDataSource.setUrl(url);
        druidDataSource.setUsername(userName);
        druidDataSource.setPassword(password);
        druidDataSource.setDriverClassName(driver);
        return druidDataSource;

    }
}
